part of native_dio_adapter;

///数据类型 如文件类型根据content-type判断
///文件地址存放data中
///
class NativeRequestOptions {
  String url;
  String method;
  Map<String, String>? headers;
  dynamic parameters;
  int? timeOut;

  NativeRequestOptions({
    required this.url,
    required this.method,
    this.headers,
    this.parameters,
    this.timeOut,
  });

  Map<String, dynamic> encode() {
    return {
      'url': url,
      'method': method,
      'headers': headers,
      'parameters': parameters,
      'timeOut': timeOut,
    };
  }
}

class NativeMultipartFile {
  String filePath;
  String fileName;
  String mediaType;

  NativeMultipartFile({
    required this.filePath,
    required this.fileName,
    required this.mediaType,
  });

  Map<String, String> encode() {
    return {
      'filePath': filePath,
      'fileName': fileName,
      'mediaType': mediaType,
    };
  }
}
